package db;

import bean.Goods;

import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;

public final class GoodsMockTable {
    private static Map<String, Goods> goodses=new LinkedHashMap<String,Goods>();

    private GoodsMockTable() {
    }

    static {
        goodses.put("苹果手机1",new Goods("1","苹果手机1",200.0,10));
        goodses.put("苹果手机2",new Goods("2","苹果手机2",400.0,10));
        goodses.put("苹果手机3",new Goods("3","苹果手机3",500.0,10));
        goodses.put("苹果手机4",new Goods("4","苹果手机4",600.0,10));
        goodses.put("苹果手机5",new Goods("5","苹果手机5",700.0,10));
    }

    public static Goods getUserByName(String name){
        return goodses.get(name);
    }

    public static Collection<Goods> getAll(){
        return goodses.values();
    }
}
